package net.spacebeeshooter.gui;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JTabbedPane;

public class DeleteListener implements ActionListener {

	private JTabbedPane tabPanel;
	
	public DeleteListener(JTabbedPane tabPanel) {
		this.tabPanel = tabPanel;
	}
	
	@Override
	public void actionPerformed(ActionEvent arg0) {
		if (tabPanel.getTabCount() > 0) {
			tabPanel.removeTabAt(tabPanel.getSelectedIndex());
		}
		
	}
}